home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 23.zip / BS1 part 23 / Macro Paint v1.10.adf / Macro.ARexx < prev    next >
Text File  |  1991-02-21  |  19KB  |  527 lines

  1.  
  2. ___________________________________________________________________
  3.  
  4. This file lists all of the ARexx commands supported in Version 1.00
  5. ___________________________________________________________________
  6.  
  7.  
  8. *mp_asknumreq MIN MAX VALUE PROMPT
  9.  
  10.  This command opens a numeric requester on
  11. the  Macro Paint ToolStrip and passes the result back to the ARexx program.
  12. The MIN and MAX arguments are the minumum and maximum value the user may
  13. enter respectively. PROMPT is an argument string containing the text to be placed
  14. in the title bar of the requester window. To request a `repetition count'
  15. between 1 and 20 the command would be:  mp_asknumreq 1 20 "Enter the
  16. repetition count:" New: VALUE is the initial value of the number.
  17.  
  18. *mp_askreq PROMPT
  19.  
  20.  This command opens a simple `Yes/No'
  21. requester on the  Macro Paint ToolStrip and passes the result back to the
  22. ARexx program. The PROMPT string appears in the requester window above the
  23. `Yes/No' response gadgets. The result will be a single character
  24. string, either `Y' or `N'. To ask the user if he/she wishes to continue,
  25. issue the command:  mp_askreq "Do you wish to continue?".
  26.  
  27. *mp_askstringreq PROMPT
  28.  
  29.  This command opens a `string'
  30. requester on the  Macro Paint ToolStrip and passes the result back to the
  31. calling ARexx program. The PROMPT string appears in the title bar of the
  32. requester above the string gadget. Any string the user enters is passed
  33. back as the result string. To prompt for the user's name, issue the
  34. command:  mp_askstringreq "What is your name?".
  35.  
  36. *mp_bcomp
  37.  
  38.  This command is identical to the
  39. `Brush/ Mask/ Complement' menu selection. It turns the current brush into a
  40. complemented image that looks like a photographic negative.
  41.  
  42. *mp_bmono
  43.  
  44.  This command is identical to the
  45. `Brush/ Color/ Monochrome' menu option. It turns the current brush into a
  46. monochrome (black and white) image.
  47.  
  48. *mp_bmask
  49.  
  50.  MODE This command replaces three menu items:
  51. `Brush/ Mask/ Cyan', `Brush/ Mask/ Magenta', and `Brush/ Mask/ Yellow'. The MODE
  52. argument takes the value 0, 1, or 2 respectively. The command 
  53. mp_bmask 1 will mask the magenta component out of the brush.
  54.  
  55. *mp_bspin
  56.  
  57.  This command rotates the current brush by
  58. 90\degrees.
  59.  
  60. *mp_btint
  61.  
  62.  This command is equivalent to selecting the
  63. `Brush/ Color/ Tint'  menu option. It blends the current brush with the
  64. current pen color using the current tint percentage.
  65.  
  66. *mp_bwash
  67.  
  68.  RED GREEN BLUE This command similar to selecting the
  69. `Brush/ Color/ Tint' menu option. It tints the current brush using the
  70. current tint percentage. Unlike the  mp_ctint command it uses a
  71. color passed as a parameter as the tint color, not the current pen color. The color
  72. component parameters are integers in the range 0-255. The 4 least
  73. significant bits are ignored at this time. The command  mp_bwash 0
  74. 255 0 will blend the brush with pure green.
  75.  
  76. *mp_bxflip
  77.  
  78.  This command flips the current brush
  79. horizontally.
  80.  
  81. *mp_byflip
  82.  
  83.  This command flips the current brush
  84. vertically.
  85.  
  86. *mp_cfill X Y R
  87.  
  88.  This command draws a filled circle using
  89. the arguments X and Y as the center point and the argument R as the radius
  90. (in pixels). The circle will be drawn in the current pen color. The command
  91.  mp_cfill 100 100 30 will draw a solid circle centered at 100,100
  92. with a radius of 30 pixels.
  93.  
  94. *mp_circle X Y R
  95.  
  96.  This command draws a circle (outline)
  97. using the arguments X and Y as the center point and the argument R as the
  98. radius (in pixels). The circle will be drawn using the current pen color
  99. and brush style. The command  mp_circle 100 100 30 will draw a circle
  100. centered at 100,100 with a radius of 30 pixels.
  101.  
  102. *mp_clear
  103.  
  104.  This command clears the screen. It it
  105. identical to selecting `Project/ Clear' from the menu. Please note that it
  106. does  not prompt the user with an `Are you Sure?' requester so {\it do
  107. not use this command unless you really want to clear the screen!
  108.  
  109. *mp_clip X1 Y1 X2 Y2
  110.  
  111.  This command is functionally equivalent
  112. to the `Cut out a brush' tool. The two pairs of XY coordinates are used as the
  113. upper left and lower right corners of the rectangular region to be cut out.
  114. To cut out a 50 X 50 brush starting at 100X100, issue the command 
  115. mp_clip 100 100 150 150. You cannot cut out an irregular (lasso) brush
  116. from ARexx.
  117.  
  118. *mp_compreg
  119.  
  120.  This command is equivalent to the
  121. `Image/ Mask/ Complement' menu option. It complements all the colors in the
  122. current region to produce a `photo-negative' effect.
  123.  
  124. *mp_copy
  125.  
  126.  This command copies the current page to the spare
  127. page. It is equivalent to selecting `Spare/ Copy To' from the menu.
  128.  
  129. *mp_curve X1 Y1 X2 Y2 X3 Y3
  130.  
  131.  This command is the ARexx
  132. equivalent to the curve drawing tool. It draws a curve using X1,Y1 and
  133. X2,Y2 as the endpoints, with X3,Y3 serving as a control point. The curve is
  134. drawn using the current pen color and brush style. The command 
  135. mp_curve 100 100 300 300 150 175 draws a curve from 100,100 to 300,300
  136. with the control point at 150,175.
  137.  
  138. *mp_delete
  139.  
  140.  This command deletes the spare page. It
  141. has no effect if there is no spare page allocated. It does not prompt the
  142. user for confirmation so use it with care.
  143.  
  144. *mp_efill X1 Y1 X2 Y2
  145.  
  146.  This command draws a filled ellipse
  147. in the current pen color. The ellipse is centered at X1,Y1; the radii of
  148. the ellipse are determined by the point X2,Y2. The command  mp_efill
  149. 300 150 100 170 draws a tall solid ellipse centered at 300,150.
  150.  
  151. *mp_ellipse X1 Y1 X2 Y2
  152.  
  153.  This command draws an ellipse
  154. (outline) using the current pen color and brush style. The ellipse is
  155. centered at X1,Y1; the radii are determined by the point X2,Y2. The
  156. command  mp_ellipse 300 150 100 170 draws a tall outlined ellipse
  157. centered at 300,150.
  158.  
  159. *mp_exit
  160.  
  161.  This option is equivalent to selecting the
  162. `Project/ Quit' menu item and answering `Yes' to the confiming requester. Do
  163. not issue this one unless you want to exit  Macro Paint without saving your
  164. work.
  165.  
  166. *mp_fill X Y
  167.  
  168.  The ARexx equivalent to the flood fill
  169. tool, this command does a flood fill in the current pen color starting at
  170. X,Y. The command  mp_fill 100 100 fills an area starting at the pixel
  171. at 100,100 and fills until it hits another color or the edge of the screen.
  172.  
  173. *mp_getaddress LINE
  174.  
  175.  This command returns a hexadecimal
  176. string containing the address of a line in  Macro Paint's internal bitmap.
  177. This is useful if you wish to directly manipulate the 12-bit 4096 color
  178. information that  Macro Paint keeps for each pixel. Each horizontal
  179. line has its own array of color information. One unsigned 16 bit word is
  180. allocated for each pixel on the line, and the lower 12 bits are used to
  181. store the RGB value of that pixel. The format of this UWORD is `4 0xXRGB' where
  182. `X' is reserved for use by  Macro Paint, `R' is a nibble containing
  183. the red component of the color, and `G' and 'B' contain the green and blue
  184. components. If you are changing the data in the bitmap you must set `X'
  185. (the four most significant bits) to 0. If you are reading from the bitmap
  186. you will need to mask off the upper nibble as it will rarely contain 0.
  187. Finally, once you have modified the bitmap you must issue an 
  188. mp_remap command before the display will be updated. Pay special attention
  189. to the `4' preceding the address! If the string returned is preceded by an
  190. `8' then you are getting the address of an array of 32 bit {\it long
  191. words with 8 bits per color component and the 8 most significant bits
  192. reserved; this is for future expansion and is not currently supported.
  193.  
  194. mp_getbackground
  195.  
  196.  This command returns the current
  197. background color. The format of the result string is `R G B' where each
  198. color component is an integer in the range 0-255.  The 4 least significant bits
  199. of each color component are not used.
  200.  
  201. mp_getbrush
  202.  
  203.  This command returns the size and address of
  204. the current brush. The format of the result string is `4 WIDTH HEIGHT
  205. 0xADDRESS'. The width and height are decimal integers. The address is a
  206. hexadecimal number which is a pointer to the brush data. The brush data
  207. consists of a WIDTH X HEIGHT array of unsigned 16 bit words; the least significant
  208. 12 bits of each word is the 4096 color RGB value of that pixel. The four
  209. most significant bits are undefined. They should be set to 0 if a pixel is
  210. changed. Pay special attention to the `4' preceding the address! If the
  211. string returned is preceded by an `8' then you are getting the address of
  212. an array of 32 bit {\it long words with 8 bits per color component and the 8 most
  213. significant bits reserved; this is for future expansion and is not currently
  214. supported.
  215.  
  216. mp_getcolor
  217.  
  218.  This command returns the current pen color.
  219. The format of the result string is `R G B' where each color component is
  220. an integer in the range 0-255. The 4 least significant bits of each color
  221. component are not used.
  222.  
  223. mp_getfile
  224.  
  225.  PATH TITLE This command opens the file
  226. requester with the string  TITLE in the title bar and the directory
  227. set to  PATH. It returns the full file name and path of the file
  228. selected by the user.
  229.  
  230. mp_getpalette
  231.  
  232.  COLOR This command returns the R G B color
  233. components of one of the colors in the palette. The result is returned in a
  234. string  RED GREEN BLUE where each color component is an integer in the
  235. range 0 to 255. The  COLOR parameter is in the range 0-11; there are
  236. 12 colors on the palette.
  237.  
  238. mp_getpixel X Y
  239.  
  240.  This command returns the color value of the
  241. pixel at the X,Y coordinate. The value is returned in a result string of
  242. the format `RED GREEN BLUE' which contains three integers from 0-255
  243. separated by spaces. Note that the least significant 4 bits of the color
  244. components are not used; a full 24-bit value is returned for future
  245. compatibility.
  246.  
  247. mp_getpoint
  248.  
  249.  This command returns the X,Y coordinate
  250. of a pixel selected by the user. The mouse pointer is changed to a crosshair with
  251. the word `Point' under it until the user clicks the left mouse button, then
  252. the result string is returned to the ARexx program. The result string takes
  253. the format ` X Y', where X and Y are integer pixel coordinates.
  254.  
  255. mp_getline
  256.  
  257.  This command returns the X,Y coordinates
  258. of the two end points of a straight line chosen by the user. The mouse
  259. pointer is changed to a crosshair with the word `Line' under it until the
  260. user clicks the left mouse button, moves the mouse, and releases the
  261. button. Macro Paint then returns the result string  X1 Y1 X2 Y2 to the ARexx
  262. program. The user sees a rubber-band line while selecting the two points.
  263.  
  264. mp_getregion
  265.  
  266.  This command returns the X,Y
  267. coordinates of the two opposite corners of a rectangle chosen by the user.
  268. The mouse pointer is changed to a crosshair with the word `Area' under it
  269. until the user clicks the left mouse button, moves the mouse, and releases
  270. the button. Macro Paint then returns the result string X1 Y1 X2 Y2 to the
  271. ARexx program. The user sees a rubber-band box while selecting the two
  272. corner points.
  273.  
  274. mp_getsize
  275.  
  276.  This command returns a string containing
  277. the width and height of  Macro Paint's screen. On a default system, it might
  278. return the string `640 400'.
  279.  
  280. mp_line X1 Y1 X2 Y2
  281.  
  282.  This command draws a line from X1,Y1
  283. to X2,Y2 using the current pen color and brush style. For example, the
  284. command  mp_line 100 100 400 200 would draw a line from 100,100 to
  285. 400,200.
  286.  
  287. mp_loadbrush FILENAME
  288.  
  289.  This command loads an IFF picture as
  290. a brush. The FILENAME argument is a string containing the name of the file
  291. along with any path or volume specifier required.
  292.  
  293. mp_loadpic FILENAME
  294.  
  295.  This command loads an IFF picture into
  296.  Macro Paint. The argument FILENAME is a string containing the name of the
  297. file along with any path or volume specifier required. For example, the
  298. command  mp_loadpic DF1:images/TimeMachine would load the file
  299. `TimeMachine' from directory `images' on volume `DF1:'.
  300.  
  301. mp_loadspare FILENAME
  302.  
  303. This command loads an IFF picture into Macro Paint's SPARE PAGE. This
  304. is extremely useful for stand-alone slide-show ARexx programs; we added
  305. it for World of Amiga/Toronto. The argument FILENAME is a string containing
  306. the name of the file along with any path or volume specifier required.
  307.  
  308. mp_loadreg FILENAME
  309.  
  310.  This command loads and IFF picture into
  311. the current image region. The image is clipped at the boundries of the
  312. region.
  313.  
  314. mp_magnify [SIZE]
  315.  
  316.  This command sets or changes the state of
  317. the magnify window. If the  SIZE parameter is 0, the magnify window is
  318. closed. If  SIZE is 1 the window is opened and set to 2X scale. If
  319.  SIZE is 2 the window is opened and set to 4X scale. If no parameter
  320. is supplied it returns the current state of the magnify window as a string
  321. containing `0', '1', or '2'.
  322.  
  323. mp_mapcolor PENCOLOR
  324.  
  325.  This command sets the current pen color
  326. to the  PENCOLOR entry in the palette; there are 12 colors in the palette
  327. which are numbered 0-11. For example, if the second color on the palette strip
  328. is red, issuing the command  mp_setcolor 1 will change the current pen color
  329. to red.
  330.  
  331. mp_mapoff
  332.  
  333.  This command instructs  Macro Paint
  334. to disable automatic color remapping after each command. When performing a
  335. long ARexx script this can result in a tremendous speed improvement.
  336.  
  337. mp_mapon
  338.  
  339.  This command re-enables  Macro
  340. Paint's automatic color mapping. It is important to issue an 
  341. mp_remap command after this in order to update the display.
  342.  
  343. mp_monoreg
  344.  
  345.  This command changes the pixels current image
  346. region into black \& white by removing all color and assigning a grey
  347. scale intensity to each pixel.
  348.  
  349. mp_paste X Y MODE
  350.  
  351.  This command pastes a brush that
  352. has been previously cut out by the user.  X and  Y are the
  353. coordinates to paste the brush to, and  MODE is the type of paste
  354. operation to perform. Currently supported paste operations are 0- Normal,
  355. 1- Blend, 2- Add, and 3- Subtract.
  356.  
  357. mp_plot X Y
  358.  
  359.  This command draws a single pixel as if
  360. the user was painting in dotted freehand mode. It uses the current pen
  361. color and brush style.
  362.  
  363. mp_printfull
  364.  
  365. This commands starts a print
  366. operation, using enough RAM to print a full screen bitmap in a single pass.
  367. Macro Paint uses the current system preferences when printing.
  368.  
  369.  
  370. mp_printprefs
  371.  
  372.  This command runs the system printer
  373. preferences program, giving the user the opportunity to change the options
  374. before printing.
  375.  
  376. mp_printstrip
  377.  
  378.  This command starts a print operation
  379. using only a small amount of RAM. The image is printed in `strips' using
  380. the current system preferences settings. Note that when using this command
  381. is used the built in preferences scaling and rotation may not work properly
  382. because the printer driver does not have access to the entire bitmap at once.
  383.  
  384. *mp_rectangle X1 Y1 X2 Y2
  385.  
  386.  This command draws a
  387. rectangle using the current pen color and brush style. The rectangle is
  388. draw with  (X1,Y1) anf  (X2,Y2) at opposite corners.
  389.  
  390. *mp_region X1 Y1 X2 Y2
  391.  
  392.  The command sets the postition 
  393. and size of the image region.  (X1,Y1) is the upper left corner of the
  394. region and  (X2,Y2) is the lower right corner.
  395. region.
  396.  
  397. mp_remap HEIGHT STARTY
  398.  
  399.  This command is used to force
  400.  Macro Paint to remap part of the screen. The  HEIGHT parameter
  401. is the number of horizontal lines to remap, and the  STARTY parameter
  402. is the first line to remap. For example, to remap lines 100 to 300 of the
  403. screen, you would issue the command  mp_remap 200 100.
  404.  
  405.  
  406. *mp_rfill X1 Y1 X2 Y2
  407.  
  408.  This command draws a solid
  409. rectangle filled with the current pen color. The rectangle is with 
  410. (X1,Y1) and  (X2,Y2) as opposite corners.
  411.  
  412.  
  413. mp_rtint
  414.  
  415.  This command tints the current image
  416. region using the current pen color and tint percentage value. It is
  417. functionally identical to selecting the Image/ Color/ Tint option from the
  418. menu.
  419.  
  420. mp_save24
  421.  
  422.  FILENAME This command saves the current
  423. picture in a 24-bit IFF file called  FILENAME.
  424.  
  425. mp_savepic
  426.  
  427.  FILENAME This command saves the current
  428. picture as a dynamic hires IFF file called  FILENAME.
  429.  
  430. mp_sayreq STRING
  431.  
  432. This command opens a requester with
  433. the message  STRING displayed for the user. The user must click on
  434. `OK' to close the requester.
  435.  
  436. mp_scale [ON|OFF]
  437.  
  438.  This command is used to set or check the
  439. auto-scale option. If no parameter is supplied, the result string will be
  440. either `ON' or `OFF' depending on the current state of the menu item. If
  441. `ON' is supplied as a parameter, auto-scale will be turned on; an `OFF'
  442. parameter turns it off.
  443.  
  444. mp_setcolor RED GREEN BLUE
  445.  
  446.  This command sets the current pen
  447. color. The color components are integers in the range 0-255. Thus, to set
  448. the pen color to pure green you would issue the commnd  mp_setcolor 0
  449. 255 0.
  450.  
  451. mp_setfont NAME SIZE 
  452.  
  453. This command sets the current
  454. font used by the text tool. To set the font to 11 point Topaz, you would
  455. issue the command  mp_setfont Topaz 11. Please note that color fonts
  456. and Anim fonts are not fully supported.
  457.  
  458. mp_setpen PENSTYLE
  459.  
  460.  This command sets the brush style
  461. to one of the ten built in styles. The argument  PENSTYLE is a single
  462. digit from 0-9.
  463.  
  464. mp_setpixel X Y R G B
  465.  
  466.  This command changes the color of
  467. the individual pixel located at X,Y. The R, G, and B parameters are
  468. integers in the range 0-255. The 4 least significant bits of each color
  469. component are currently ignored; the full 24-bit value is passed for future
  470. compatibility.
  471.  
  472. *mp_spray X Y NUM
  473.  
  474.  This command gives you control over
  475. the air brush tool.  (X,Y) are the coordinates to spray at, and 
  476. NUM is the number of pixels to randomly paint in the area around 
  477. (X,Y). The higher the  NUM, the higher the density of the spray.
  478.  
  479.  
  480. *mp_spraysize AREA
  481.  
  482.  This command sets the spray radius of
  483. the air brush tool. The default is 8.
  484.  
  485. *mp_swap
  486.  
  487.  This commands is functionally equivalent to
  488. the `Spare/ Swap' menu option. It swaps the current page with the spare page.
  489.  
  490.  
  491. *mp_text X Y STRING
  492.  
  493.  This commands draws the text 
  494. STRING at the position  (X,Y) using the current font, size, and pen
  495. color.
  496.  
  497. *mp_tintval TINTVALUE
  498.  
  499.  This command sets the tint
  500. percentage value used by the tint and blend functions. Legal values for 
  501. TINTVALUE are in the range 0-100.
  502. ARexx!Command Reference!Tint Percent
  503.  
  504. *mp_toggle
  505.  
  506. This command toggles the ToolStrip on and
  507. off. It is functionally equivalent to pressing `F10'.
  508.  
  509. mp_toolstrip [ON|OFF}
  510.  
  511. This command returns the current state of the ToolStrip if no parameters
  512. are supplied. If ON or OFF is supplied, the ToolStrip is switch to that
  513. state. The result string is either `ON' or `OFF'.
  514.  
  515. mp_transparent [ON|OFF]
  516.  
  517. This command sets the transparency option. If no parameter is supplied
  518. it returns either `ON' or `OFF', indicating the current state of the
  519. checkmark. Sending the command  mp_transparent ON turns transparency on,
  520. and  mp_transparent OFF turns it off.
  521.  
  522. *mp_version 
  523.  
  524. This command returns the version number of Macro Paint. It is an integer.
  525. Version 1.00 will return the string ~100". 
  526.  
  527.